home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Compute! Gazette 1986 August
/
1986-08.d64
/
turbo bootmaker
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-09-20
|
2KB
|
50 lines
100 print"[147]"chr$(8)chr$(14):print tab(10)"** [212]urbo[194]ootmaker **":z$=chr$(0)
110 for ad=822 to 915:read by:ck=ck+by:poke ad,by:next:if ck=11597 then 130
120 print"[197]rror in [196][193][212][193] statements!":stop
130 print" [201]nsert a disk containing [212]urbo[196]isk."
140 print tab(7)"[208]ress [210][197][212][213][210][206] [146] when ready."
150 get k$:if k$<>chr$(13) then 150
160 close 15:open 15,8,15,"i0":gosub 500:if e then 600
170 t$="":print"[206]ame of [212]urbo[196]isk file:":input t$:if t$="" then 170
180 open 1,8,8,"0:"+t$+",p,r":get#1,a$,b$:gosub 500:if e then 600
190 tl=asc(a$+z$):th=asc(b$+z$):poke 834,tl:poke 836,th:poke 861,tl:poke 862,th
200 ts=49152:te=ts:print tab(7)"[210]eading: "t$
210 for ss=0 to 1:get#1,a$:ss=st:poke te,asc(a$+z$):te=te+1:next
220 close 1:if st<>64 then print"[197]rror reading [212]urbo[196]isk file.":stop
230 print" [201]nsert the disk on which you wish to":print" create the boot file."
240 print tab(7)"[208]ress [210][197][212][213][210][206] [146] when ready."
250 get k$:if k$<>chr$(13) then 250
260 print#15,"i0":gosub500:if e then600
270 p$="":print"[206]ame of program to [212]urbo[194]oot:":input p$:if p$="" then 290
280 p=len(p$):poke 874,p:for i=1 to p:poke 899+i,asc(mid$(p$,i)):next
290 open 1,8,8,"0:"+p$+",p,r":gosub 500:close 1:if e=0 then 310
300 if e=62 then print" [210]emember to put a copy of "p$:print" on this disk."
310 printtab(5)"[201]s the program [194][193][211][201][195] or [205][204]?":printtab(9)"[208]ress [194] [146] or [205] [146]"
320 get k$:if k$="b" then 380
330 if k$<>"m" then 320
340 a$="":input"[211]tarting address";a$:if a$="" then 340
350 d=0:if left$(a$,1)<>"$" then d=val(a$):goto 370
360 for i=2 to len(a$):a=(asc(mid$(a$,i))and 127)-48:d=(16*d)+a+(7*(a>9)):next
370 dh=int(d/256):dl=d-(256*dh):poke 891,76:poke 892,dl:poke 893,dh
380 b$="":print"[206]ame for [212]urbo[194]ooting file:":input b$:if b$="" then 380
390 open 1,8,8,"0:"+b$+",p,w":gosub 500:if e then 600
400 print tab(7)"[215]riting: "b$
410 print#1,chr$(38);chr$(3);chr$(54);chr$(3);
420 for ad=808 to 915:print#1,chr$(peek(ad));:next
430 for ad=ts to te:print#1,chr$(peek(ad));:next
440 close 1:gosub 500:if e then 600
450 close 15:print""b$" will now turboboot "p$:end
500 input#15,e,e$:return
600 close 1:print"";
610 if e=62 then print"[206]o file with that name on this disk.":goto 170
620 if e=63 then print"[212]hat name is already used on this disk.":goto 380
630 close15:print"[196]isk [197]rror:";e;e$:end
822 data 32,138,255,169,148,160,3,133,251,132
832 data 252,169,0,160,192,133,253,132,254,160
842 data 0,177,251,145,253,200,208,249,230,252
852 data 230,254,165,254,201,196,208,239,32,0
862 data 192,32,68,229,166,186,160,1,32,186
872 data 255,169,1,162,132,160,3,32,189,255
882 data 169,0,32,213,255,134,45,132,46,32
892 data 94,166,32,142,166,76,174,167,42,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0